/**
 * @ClassName Demo01
 * @Description switch语句
 * @Author Li
 * @Date 2022/7/31 9:44
 * @ModifyDate 2022/7/31 9:44
 * @Version 1.0
 */
public class Demo01 {
    public static void main(String[] args) {
        // 定义变量，判断是星期几
        int weekday = 3;
        // switch语句实现
        switch (weekday) {
            case 1:
                System.out.println("星期一");
                break;
            case 2:
                System.out.println("星期二");
                break;
            case 3:
                System.out.println("星期三");
                break;
            case 4:
                System.out.println("星期四");
                break;
            case 5:
                System.out.println("星期五");
                break;
            case 6:
                System.out.println("星期六");
                break;
            case 7:
                System.out.println("星期日");
                break;
            default:
                System.out.println("这是无效的天数！");
                break;
        }
    }
}
